import { defineComponent } from 'vue';

export interface UserInfo {
  id: number;
  name: string;
  role: string;
}

export interface Menu {
  path: string;
  title: string;
  icon?: string;
  children?: Menu[];
}

export interface UserList {
  id: number;
  name: string;
  email: string;
  role: string;
  create_time: string;
  is_active: boolean;
}

export interface RoleList {
  id: number;
  name: string;
  code: string;
  description: string;
  create_time: string;
}

export interface PermissionList {
  id: number;
  module: string;
  operation: string;
  description: string;
  create_time: string;
}

export interface UserInfoList {
  id: number;
  email: string;
  name: string;
  gender: string;
  phone: string;
  birthday: string;
  address: string;
  update_time: string;
}


export interface addForm {
  email: string;
  role: string;
}

export interface editForm {
  id: number;
  email: string;
  role: string;
}

export interface UserInfoEditForm {
  id: number;
  name: string;
  gender: string;
  phone: string;
  birthday: string;
  address: string;
}

export interface SubmitParams {
  validateResult: boolean;
  firstError: string;
}


export interface addRoleForm {
  name: string;
  code: string;
  description: string;
}

export interface editRoleForm {
  id: number;
  name: string;
  code: string;
  description: string;
}

export interface addPermissionForm {
  module: string;
  operation: string;
  description: string;
}

export interface editPermissionForm {
  id: number;
  module: string;
  operation: string;
  description: string;
}

export interface PermissionNode {
  id: string | number;
  label: string;
  children?: PermissionNode[];
  description?: string;
}